<?php
//abstração de tabela
defined('_JEXEC') or die( 'Restricted access' );


/**
 * @package		Joomla
 * @subpackage	Hotel
 */
class TableApto extends JTable
{
	/** @var int Primary key */
	var $num 		= null;
	/** @var string */
	var $qtdeCamaCasal 		= null;
	/** @var string */
	var $qtdeCamaSolteiro		= null;
	/** @var string */
	var $tipo 		= '';
	/** @var string */
        var $ocupado 		= null;
	/** @var double */

	/**
	* @param database A database connector object
	*/
	function __construct(&$db)
	{
		parent::__construct( 'apto', 'num', $db );
	}

	/**
	 * Overloaded check function
	 *
	 * @access public
	 * @return boolean
	 * @see JTable::check
	 * @since 1.5
	 */
	function check()
	{
		
		if (is_null($this->num) || $this->num == 0) {
			$this->setError(JText::_( 'Numero Invalido' ));
			return false;
		}

		// check for valid name
		

		return true;
	}
}

